package com.persondemo.videoappliction.ui.adapter;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.persondemo.videoappliction.R;
import com.persondemo.videoappliction.bean.MeCollectBean;
import com.persondemo.videoappliction.utils.ImageLoaderUtil;

import java.util.List;

/**
 * Created by Administrator on 2018/4/20.
 */

public class MecollectAdapter extends BaseQuickAdapter<MeCollectBean.DataBean, BaseViewHolder> {
    private Context context;

    public MecollectAdapter(@Nullable List<MeCollectBean.DataBean> data, Context context) {
        super(R.layout.item_me_collect, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, MeCollectBean.DataBean item) {
        ImageLoaderUtil.LoadImagelarge(context,item.getAvatar(),helper.getView(R.id.user_head_img));
        helper.setText(R.id.me_collect_name, item.getUsername());
        helper.setText(R.id.me_collect_comment, item.getContent());
        helper.setText(R.id.me_collect_time, item.getTime());
    }
}
